home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / dsp / 56000tar.z / 56000tar / 56000 / boot / boot.asm < prev    next >
Assembly Source File  |  1992-04-28  |  2KB  |  62 lines

  1. ;*****************************************************************************
  2. ;  This routine demonstrates how to construct a module which will boot
  3. ;  from an external byte-wide EPROM and execute in on-chip Program RAM.
  4. ;
  5. ;  The main routine simply toggles the least significant bit of Port-C
  6. ;  and this activity can be monitored externally with an oscilloscope
  7. ;  to confirm that the boot occurred correctly.
  8. ;
  9. ;  assemble this routine with the following command line:
  10. ;     asm56000 -a -b -l boot
  11. ;
  12. ;  build the S-Record file for use by the PROM-Burner via the SREC utility:
  13. ;     SREC boot
  14. ;
  15. ;  The vectors will be placed into the EPROM at address $C000 and the 
  16. ;  main routine will start at $C0F0 in the EPROM. 
  17. ;*****************************************************************************
  18. m_pcc       equ    $FFE1           ;Port-C control register address (in X:)
  19. m_pcddr     equ    $FFE3           ;Port-C data direction register
  20. m_pcd       equ    $FFE5           ;Port-C data register
  21. main        equ    $50             ;main routine starting address
  22. RUNTIME     equ    0               ;bootstrap into P:0
  23. LOADTIME    equ    $C000           ;load into EPROM at P:$C000
  24.  
  25.      page   132,66,3,3             ;format the page for 132 columns, 66 lines
  26.  
  27.                                    
  28.      org    P:RUNTIME,P:LOADTIME
  29.      jsr    <GO_1                  ;RESET Vector...start program
  30.      nop                           ;...vectors have 2 words...
  31.  
  32.      DUP    62                     ;define unused vectors with
  33.      nop                           ;..."safe" default routine
  34.      nop
  35.      ENDM
  36.  
  37.  
  38.      org    P:main,P:LOADTIME+(3*main)
  39. GO_1
  40.                                    ;**** simple routine to toggle I/O pin ****
  41.      movep  #$0001,x:m_pcddr       ;only lsb of Port-C will be an output
  42.      movep  #$0000,x:m_pcc         ;all Port-C pins will be G.P. I/O
  43. _loop
  44.      bchg   #0,x:m_pcd             ;toggle the lsb of Port-C
  45.      jmp    <_loop
  46.  
  47. CodeSize   set *
  48.  
  49. ;
  50. ;    test to see if the code size exceeds the available on-chip resources
  51. ;           (512 words in on-chip P:RAM)
  52. ;
  53.      IF     CodeSize>$1FF
  54.      msg    "  WARNING WARNING WARNING WARNING WARNING"
  55.      msg    "*** program size EXCEEDS onboard P:RAM ***"
  56.      msg    "  WARNING WARNING WARNING WARNING WARNING"
  57.      ENDIF
  58.  
  59.      END
  60.  
  61.  
  62.